package net.yxsoft.kit;

import com.jfinal.template.Directive;
import com.jfinal.template.Env;
import com.jfinal.template.expr.ast.ExprList;
import com.jfinal.template.io.Writer;
import com.jfinal.template.stat.Scope;



import java.util.Date;

public class SplitDirective extends Directive {
    //ExprList 代表指令参数表达式列表
    public void setExprList(ExprList exprList) {
        // 在这里可以对 exprList 进行个性化控制

        super.setExprList(exprList);
    }
    static final String KEY_DIRECTIVE="_KEY_DIRECTIVE";
    public void exec(Env env, Scope scope, Writer writer) {

        String ds=scope.getData().get("startPage").toString();
        String [] se=ds.split(",");
      //  stat.exec(env, scope, writer);  // 执行 body
        write(writer, se.toString());
    }

    public boolean hasEnd() {
        return true;  // 返回 true 则该指令拥有 #end 结束标记
    }
}
